<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilflash: xilflash_cfi.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilflash
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilflash__cfi_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xilflash_cfi.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains methods used to extract and interpret Common Flash Interface(CFI) from a flash memory part that supports the CFI query command. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.00a rmm  10/25/07 First release
1.00a mta  10/25/07 Updated to flash library
1.01a ksu  04/10/08 Added support for AMD CFI Interface
2.00a ktn  12/04/09 Updated to use the HAL processor APIs/macros
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a86ebd4f16fd21a6e7e557d0bd00e9cb3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#a86ebd4f16fd21a6e7e557d0bd00e9cb3">XFLASH_CFI_H</a></td></tr>
<tr class="memdesc:a86ebd4f16fd21a6e7e557d0bd00e9cb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">&lt; prevent circular inclusions  <a href="#a86ebd4f16fd21a6e7e557d0bd00e9cb3">More...</a><br/></td></tr>
<tr class="separator:a86ebd4f16fd21a6e7e557d0bd00e9cb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12bd0c89aecceb6ce7e6449d0a76137a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#a12bd0c89aecceb6ce7e6449d0a76137a">XFL_CFI_POSITION_PTR</a>(Ptr, BaseAddr, Interleave, ByteAddr)</td></tr>
<tr class="memdesc:a12bd0c89aecceb6ce7e6449d0a76137a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves the CFI data pointer to a physical address that corresponds to a specific CFI byte offset.  <a href="#a12bd0c89aecceb6ce7e6449d0a76137a">More...</a><br/></td></tr>
<tr class="separator:a12bd0c89aecceb6ce7e6449d0a76137a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abee73d45fcdf7098f5b2daf57b27698a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#abee73d45fcdf7098f5b2daf57b27698a">XFL_CFI_ADVANCE_PTR8</a>(Ptr, Interleave)&#160;&#160;&#160;(Ptr = (void*)((u32)Ptr + (Interleave)))</td></tr>
<tr class="memdesc:abee73d45fcdf7098f5b2daf57b27698a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Advances the CFI pointer to the next byte.  <a href="#abee73d45fcdf7098f5b2daf57b27698a">More...</a><br/></td></tr>
<tr class="separator:abee73d45fcdf7098f5b2daf57b27698a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e6f76db4955297ab8edfd917acf4e40"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#a2e6f76db4955297ab8edfd917acf4e40">XFL_CFI_ADVANCE_PTR16</a>(Ptr, Interleave)&#160;&#160;&#160;(Ptr = (void*)((u32)Ptr + ((Interleave) &lt;&lt; 1)))</td></tr>
<tr class="memdesc:a2e6f76db4955297ab8edfd917acf4e40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Advances the CFI pointer to the next 16-bit quantity.  <a href="#a2e6f76db4955297ab8edfd917acf4e40">More...</a><br/></td></tr>
<tr class="separator:a2e6f76db4955297ab8edfd917acf4e40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Layout constants</div></td></tr>
<tr class="memitem:a5f6c51f2f7f22d4a83dd5fb20cea6812"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#a5f6c51f2f7f22d4a83dd5fb20cea6812">XFL_LAYOUT_NUM_PARTS_MASK</a>&#160;&#160;&#160;0x000000FF</td></tr>
<tr class="memdesc:a5f6c51f2f7f22d4a83dd5fb20cea6812"><td class="mdescLeft">&#160;</td><td class="mdescRight">LAYOUT constants are used to parse the XFL_LAYOUT_X* constants.  <a href="#a5f6c51f2f7f22d4a83dd5fb20cea6812">More...</a><br/></td></tr>
<tr class="separator:a5f6c51f2f7f22d4a83dd5fb20cea6812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6b3f8e8b48c63755f9ea145c7f38acd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6b3f8e8b48c63755f9ea145c7f38acd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_PART_MODE_MASK</b>&#160;&#160;&#160;0x0000FF00</td></tr>
<tr class="separator:af6b3f8e8b48c63755f9ea145c7f38acd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac01b8c2bf3859ac0e1a44044368d0382"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac01b8c2bf3859ac0e1a44044368d0382"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_PART_WIDTH_MASK</b>&#160;&#160;&#160;0x00FF0000</td></tr>
<tr class="separator:ac01b8c2bf3859ac0e1a44044368d0382"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a736f5a863edb22e78c84a74662dbb2b8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a736f5a863edb22e78c84a74662dbb2b8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_CFI_INTERL_MASK</b>&#160;&#160;&#160;0xFF000000</td></tr>
<tr class="separator:a736f5a863edb22e78c84a74662dbb2b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a652af384d5f6e590922362df47ecea46"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a652af384d5f6e590922362df47ecea46"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_NUM_PARTS_1</b>&#160;&#160;&#160;0x00000001</td></tr>
<tr class="separator:a652af384d5f6e590922362df47ecea46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5ba160038c186769a1778c32f084cb2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5ba160038c186769a1778c32f084cb2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_NUM_PARTS_2</b>&#160;&#160;&#160;0x00000002</td></tr>
<tr class="separator:aa5ba160038c186769a1778c32f084cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e597e4605703e0a1aae1b4202949b8f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9e597e4605703e0a1aae1b4202949b8f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_NUM_PARTS_4</b>&#160;&#160;&#160;0x00000004</td></tr>
<tr class="separator:a9e597e4605703e0a1aae1b4202949b8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ab02e3f79423815dbfdb7a11dfcfadf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ab02e3f79423815dbfdb7a11dfcfadf"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_PART_MODE_8</b>&#160;&#160;&#160;0x00000100</td></tr>
<tr class="separator:a7ab02e3f79423815dbfdb7a11dfcfadf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa64aa76c7afa8853905ed7cb28b00894"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa64aa76c7afa8853905ed7cb28b00894"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_PART_MODE_16</b>&#160;&#160;&#160;0x00000200</td></tr>
<tr class="separator:aa64aa76c7afa8853905ed7cb28b00894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad35edd42f6c0220d9e0d6ec3ce94241d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad35edd42f6c0220d9e0d6ec3ce94241d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_PART_WIDTH_8</b>&#160;&#160;&#160;0x00010000</td></tr>
<tr class="separator:ad35edd42f6c0220d9e0d6ec3ce94241d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51ea0dbfb650b39b8ee19705c944c050"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51ea0dbfb650b39b8ee19705c944c050"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_PART_WIDTH_16</b>&#160;&#160;&#160;0x00020000</td></tr>
<tr class="separator:a51ea0dbfb650b39b8ee19705c944c050"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1ac439ba26f75ac0c5a386e69d8c5e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac1ac439ba26f75ac0c5a386e69d8c5e2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_CFI_INTERL_1</b>&#160;&#160;&#160;0x01000000</td></tr>
<tr class="separator:ac1ac439ba26f75ac0c5a386e69d8c5e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a520acc900657f9a7bdeb320539d0c495"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a520acc900657f9a7bdeb320539d0c495"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_CFI_INTERL_2</b>&#160;&#160;&#160;0x02000000</td></tr>
<tr class="separator:a520acc900657f9a7bdeb320539d0c495"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98a4906acc2683a6b07af3c594d88e5b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98a4906acc2683a6b07af3c594d88e5b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_CFI_INTERL_4</b>&#160;&#160;&#160;0x04000000</td></tr>
<tr class="separator:a98a4906acc2683a6b07af3c594d88e5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf7e09b41712c8dc6ec2e2d8bc0cd568"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf7e09b41712c8dc6ec2e2d8bc0cd568"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XFL_LAYOUT_CFI_INTERL_8</b>&#160;&#160;&#160;0x08000000</td></tr>
<tr class="separator:aaf7e09b41712c8dc6ec2e2d8bc0cd568"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a025ba2cd783a06301dc7caa4fb537d95"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon</a> (XFlash *InstancePtr, u8 BusWidth)</td></tr>
<tr class="memdesc:a025ba2cd783a06301dc7caa4fb537d95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the standard CFI data from the part(s), interpret the data, and update the provided geometry and properties structures.  <a href="#a025ba2cd783a06301dc7caa4fb537d95">More...</a><br/></td></tr>
<tr class="separator:a025ba2cd783a06301dc7caa4fb537d95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad868fe5f733b6042f9ee8b6adb59652c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#ad868fe5f733b6042f9ee8b6adb59652c">XFlashCFI_Read8</a> (u8 *Ptr, u8 Interleave, u8 Mode)</td></tr>
<tr class="memdesc:ad868fe5f733b6042f9ee8b6adb59652c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads 8-bits of data from the CFI data location into a local variable.  <a href="#ad868fe5f733b6042f9ee8b6adb59652c">More...</a><br/></td></tr>
<tr class="separator:ad868fe5f733b6042f9ee8b6adb59652c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25c9cc3b842a35592e8b009f64b3df1f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilflash__cfi_8h.html#a25c9cc3b842a35592e8b009f64b3df1f">XFlashCFI_Read16</a> (u8 *Ptr, u8 Interleave, u8 Mode)</td></tr>
<tr class="memdesc:a25c9cc3b842a35592e8b009f64b3df1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads 16-bits of data from the CFI data location into a local variable.  <a href="#a25c9cc3b842a35592e8b009f64b3df1f">More...</a><br/></td></tr>
<tr class="separator:a25c9cc3b842a35592e8b009f64b3df1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a2e6f76db4955297ab8edfd917acf4e40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XFL_CFI_ADVANCE_PTR16</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Ptr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Interleave&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(Ptr = (void*)((u32)Ptr + ((Interleave) &lt;&lt; 1)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Advances the CFI pointer to the next 16-bit quantity. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Ptr</td><td>is the pointer to advance. Can be a pointer to any type. </td></tr>
    <tr><td class="paramname">Interleave</td><td>is the byte interleaving (based on part layout).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Adjusted Ptr. </dd></dl>

<p>Referenced by <a class="el" href="xilflash__cfi_8c.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon()</a>.</p>

</div>
</div>
<a class="anchor" id="abee73d45fcdf7098f5b2daf57b27698a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XFL_CFI_ADVANCE_PTR8</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Ptr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Interleave&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(Ptr = (void*)((u32)Ptr + (Interleave)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Advances the CFI pointer to the next byte. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Ptr</td><td>is the pointer to advance. Can be a pointer to any type. </td></tr>
    <tr><td class="paramname">Interleave</td><td>is the byte interleaving (based on part layout).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Adjusted Ptr. </dd></dl>

<p>Referenced by <a class="el" href="xilflash__cfi_8c.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon()</a>.</p>

</div>
</div>
<a class="anchor" id="a12bd0c89aecceb6ce7e6449d0a76137a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XFL_CFI_POSITION_PTR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Ptr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">BaseAddr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Interleave, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ByteAddr&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">(                                                                       \</div>
<div class="line">                        Ptr = (<span class="keywordtype">void</span>*)((u32)BaseAddr + ((u32)Interleave *                \</div>
<div class="line">                                        (u32)ByteAddr))         \</div>
<div class="line">        )</div>
</div><!-- fragment -->
<p>Moves the CFI data pointer to a physical address that corresponds to a specific CFI byte offset. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Ptr</td><td>is the pointer to modify. Can be of any type. </td></tr>
    <tr><td class="paramname">BaseAddr</td><td>is the base address of flash part. </td></tr>
    <tr><td class="paramname">Interleave</td><td>is the byte interleaving (based on part layout). </td></tr>
    <tr><td class="paramname">ByteAddr</td><td>is the byte offset within CFI data to read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The Ptr argument is set to point at the CFI byte specified by the ByteAddr parameter. </dd></dl>

<p>Referenced by <a class="el" href="xilflash__cfi_8c.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon()</a>.</p>

</div>
</div>
<a class="anchor" id="a5f6c51f2f7f22d4a83dd5fb20cea6812"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XFL_LAYOUT_NUM_PARTS_MASK&#160;&#160;&#160;0x000000FF</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>LAYOUT constants are used to parse the XFL_LAYOUT_X* constants. </p>

<p>Referenced by <a class="el" href="xilflash__cfi_8c.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon()</a>.</p>

</div>
</div>
<a class="anchor" id="a86ebd4f16fd21a6e7e557d0bd00e9cb3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XFLASH_CFI_H</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>&lt; prevent circular inclusions </p>
<p>by using protection macros </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a25c9cc3b842a35592e8b009f64b3df1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XFlashCFI_Read16 </td>
          <td>(</td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Interleave</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads 16-bits of data from the CFI data location into a local variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Ptr</td><td>is the pointer to read. Can be a pointer to any type. </td></tr>
    <tr><td class="paramname">Interleave</td><td>is the byte interleaving (based on part layout). </td></tr>
    <tr><td class="paramname">Mode</td><td>is the mode of operation (based on part layout).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The 16-bit value at Ptr adjusted for the interleave factor. </dd></dl>

<p>Referenced by <a class="el" href="xilflash__cfi_8c.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon()</a>.</p>

</div>
</div>
<a class="anchor" id="ad868fe5f733b6042f9ee8b6adb59652c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XFlashCFI_Read8 </td>
          <td>(</td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Interleave</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads 8-bits of data from the CFI data location into a local variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Ptr</td><td>is the pointer to read. Can be a pointer to any type. </td></tr>
    <tr><td class="paramname">Interleave</td><td>is the byte interleaving (based on part layout). </td></tr>
    <tr><td class="paramname">Mode</td><td>is the mode of operation (based on part layout).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The byte at Ptr adjusted for the interleave factor. </dd></dl>

<p>Referenced by <a class="el" href="xilflash__cfi_8c.html#a025ba2cd783a06301dc7caa4fb537d95">XFlashCFI_ReadCommon()</a>.</p>

</div>
</div>
<a class="anchor" id="a025ba2cd783a06301dc7caa4fb537d95"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XFlashCFI_ReadCommon </td>
          <td>(</td>
          <td class="paramtype">XFlash *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>BusWidth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the standard CFI data from the part(s), interpret the data, and update the provided geometry and properties structures. </p>
<p>Extended CFI data is part specific and ignored here. This data must be read by the specific flash device family library.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is the pointer to the XFlash instance. </td></tr>
    <tr><td class="paramname">BusWidth</td><td>is the total width of the flash memory, in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XFLASH_CFI_QUERY_ERROR if an error occurred interpreting the data.</li>
<li>XFLASH_PART_NOT_SUPPORTED if invalid Layout parameter.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xilflash__cfi_8h.html#a2e6f76db4955297ab8edfd917acf4e40">XFL_CFI_ADVANCE_PTR16</a>, <a class="el" href="xilflash__cfi_8h.html#abee73d45fcdf7098f5b2daf57b27698a">XFL_CFI_ADVANCE_PTR8</a>, <a class="el" href="xilflash__cfi_8h.html#a12bd0c89aecceb6ce7e6449d0a76137a">XFL_CFI_POSITION_PTR</a>, <a class="el" href="xilflash__cfi_8h.html#a5f6c51f2f7f22d4a83dd5fb20cea6812">XFL_LAYOUT_NUM_PARTS_MASK</a>, <a class="el" href="xilflash__cfi_8h.html#a25c9cc3b842a35592e8b009f64b3df1f">XFlashCFI_Read16()</a>, and <a class="el" href="xilflash__cfi_8h.html#ad868fe5f733b6042f9ee8b6adb59652c">XFlashCFI_Read8()</a>.</p>

<p>Referenced by <a class="el" href="group__xilflash__apis.html#gab4c908ad78f6ded9407d0dc7ed611370">XFlash_Initialize()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
